/**
 * 
 */
package info.niwota.fwrite;

import org.json.JSONObject;

import android.graphics.Canvas;
import android.graphics.Paint;

/**
 * @author qiangli
 * 
 */
public class BlankElement extends Element {

	private static final long serialVersionUID = 1L;
	
	public BlankElement() {
		this(16, 16, 0, 0xffffffff);
	}

	public BlankElement(int w, int h, int inset, int color) {
		super(w, h, inset, color);
	}

	@Override
	public void draw(Canvas canvas, Paint paint, float x, float y,
			float height, float lh) {
		paint.setTextSize(16);
		canvas.drawText(" ", x, y, paint);
	}

	public BlankElement(JSONObject obj) throws Exception {
		super(obj);
	}

	public JSONObject toJSON() throws Exception {
		JSONObject obj = super.toJSON(ELEMENT_BLANK);
		return obj;
	}
}
